package sis.studentinfotest;/*
 * @auther 顶风少年
 * @mail dfsn19970313@foxmail.com
 * @date 2019-07-25 18:22
 * @notify
 * @version 1.0
 */

import junit.framework.TestCase;
import sis.studentinfo.Scorer;

public class ScorerTest extends TestCase {

    public void testCaputureScore(){
        Scorer scorer = new Scorer();
        assertEquals(75,scorer.score("75"));
    }
    public void testBadScoreEntered(){
        Scorer scorer = new Scorer();
        try {
            scorer.score("add");
            fail("并没有出异常了,说明有问题");
        }catch (NumberFormatException e){

        }
    }

    public void testIsValid(){
        Scorer scorer = new Scorer();
        assertTrue(scorer.isValid("75"));
        assertFalse(scorer.isValid("dd"));
    }

}
